﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BasicBase/BasicBase.master" AutoEventWireup="true"
    CodeFile="DrillingQureyStat.aspx.cs" Inherits="BasicBase_Drilling_DrillingQureyStat"
    StylesheetTheme="Content" %>

<%@ Register Src="../../UserContral/ListPageContral.ascx" TagName="ListPageContral"
    TagPrefix="uc1" %>
<%@ Register Src="../FireProject/UCDepartment.ascx" TagName="UCDepartment" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellspacing="0" cellpadding="0" width="100%" class="intable">
        <caption>
            <span>演练记录查询条件</span></caption>
        <tr>
            <td class="title" style="width: 100px">
                预案制定单位：
            </td>
            <td>
                <asp:DropDownList ID="DepartmentList" runat="server" AutoPostBack="True" DataTextField="ShortName"
                    DataValueField="DepartmentID" Width="15%" AppendDataBoundItems="True" OnSelectedIndexChanged="DepartmentList_SelectedIndexChanged">
                    <asp:ListItem Value="">----单位-----</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="UnitList" runat="server" DataTextField="FullName" DataValueField="DepartmentID"
                    Width="47%" AutoPostBack="True" OnSelectedIndexChanged="UnitList_SelectedIndexChanged"
                    AppendDataBoundItems="True">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                预案类别：
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlTypeID" AutoPostBack="True" OnSelectedIndexChanged="ddlTypeID_SelectedIndexChanged"
                    Width="406" AppendDataBoundItems="True" DataTextField="ItemName" DataValueField="ItemID">
                    <asp:ListItem></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                预案类型：
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlClassID" Width="406" AppendDataBoundItems="True"
                    AutoPostBack="True" OnSelectedIndexChanged="ddlClassID_SelectedIndexChanged"
                    DataTextField="ItemName" DataValueField="ItemID">
                    <asp:ListItem></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                预案名称：
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlProjectName" Width="406" DataTextField="ProjectName"
                    DataValueField="ProjectID" AppendDataBoundItems="True">
                    <asp:ListItem></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                演练部位：
            </td>
            <td>
                <asp:TextBox ID="Part" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="title">
                演练组织单位：
            </td>
            <td>
                <asp:DropDownList ID="departmentList1" runat="server" AutoPostBack="True" DataTextField="ShortName"
                    DataValueField="DepartmentID" Width="15%" AppendDataBoundItems="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                    <asp:ListItem Value="">----单位-----</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="UnitList1" runat="server" DataTextField="FullName" DataValueField="DepartmentID"
                    Width="47%" AppendDataBoundItems="True">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title" style="width: 80px">
                演练时间：
            </td>
            <td>
                <asp:TextBox ID="DateStart" runat="server" Width="100px"></asp:TextBox>
                至
                <asp:TextBox ID="DateEnd" runat="server" Width="100px"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" Animated="False"
                    TargetControlID="DateStart">
                </ajaxToolkit:CalendarExtender>
                <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" Animated="False"
                    TargetControlID="DateEnd">
                </ajaxToolkit:CalendarExtender>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <ul class="topmenu">
                    <li>
                        <asp:LinkButton runat="server" ID="lkbQurey" Text="统计" OnClick="lbtQurey_Click"></asp:LinkButton>
                    </li>
                </ul>
            </td>
        </tr>
    </table>
    <table cellspacing="0" cellpadding="0" style="border-collapse: collapse; border-color: #CEE7F7;
        border-width: 1px; border-style: solid; text-align: center;" class="intable"
        width="100%">
        <caption>
            <span>统计结果</span></caption>
        <tr>
            <td class="title" style="width: 20%; border-collapse: collapse; border-color: #CEE7F7;
                border-width: 1px; border-style: solid;">
                实战演练总次数：
            </td>
            <td colspan="3" style="border: 1px solid #CEE7F7; border-collapse: collapse;">
                <asp:Label ID="DrillingCount" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                参加单位的形式
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                单位数量
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                参加人数
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                车辆数量
            </td>
        </tr>
        <tr>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                消防部队
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="AmyDepar" runat="server"></asp:Label>
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="AmyPeople" runat="server"></asp:Label>
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="AmyVehicle" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                地方单位
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="PartDepart" runat="server"></asp:Label>
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="PartPepole" runat="server"></asp:Label>
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="PartVehicle" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                总计
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="TotleDepart" runat="server"></asp:Label>
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="TotlePeople" runat="server"></asp:Label>
            </td>
            <td style="border-collapse: collapse; border-color: #CEE7F7; border-width: 1px; border-style: solid;">
                <asp:Label ID="TotleVehicle" runat="server"></asp:Label>
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="UserGrid" runat="server" AutoGenerateColumns="False" Caption="<span>演练记录列表</span>"
        DataKeyNames="Id" OnRowDataBound="UserGrid_RowDataBound">
        <Columns>
            <asp:TemplateField>
                <HeaderStyle HorizontalAlign="Left" Width="5%" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblID"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="参照预案">
                <ItemTemplate>
                    <%# GetFireProjectName(Eval("FireProjectID").ToString())%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="演练组织单位">
                <ItemTemplate>
                    <%# GetDepartmentName(Eval("DepartmentId").ToString())%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Part" HeaderText="演练部位" />
            <asp:BoundField DataField="DateDrilling" HeaderText="演练时间" HtmlEncode="false" DataFormatString="{0:yyyy-MM-dd}" />
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='DrillingView.aspx?id=<%# Eval("id") %>'>
                        <img alt="查看" src="../../Images/UserView.gif" /></a>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Right" />
            </asp:TemplateField>
        </Columns>
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
    <uc1:ListPageContral ID="ListPageContral1" PageSize="15" OnPageSizeChange="ListPageContral1_PageSizeChange"
        runat="server" />
    <br />
    <br />
    <asp:Label runat="server" ID="lblWhere" Visible="False"></asp:Label>
</asp:Content>
